<template>
	<div>
		<h1>
			修改类型
		</h1>
		<el-form label-width="80px">
			<el-form-item label="级别:">
				<el-input v-model="book.pid"></el-input>
			</el-form-item>
			<el-form-item label="名称:">
				<el-input v-model="book.name"></el-input>
			</el-form-item>
			<el-form-item label="顺序:">
				<el-input v-model="book.prio"></el-input>
			</el-form-item>

		</el-form>
		<el-button @click="dd()" style="margin-left: 27%;">保存</el-button>
	</div>

</template>

<script>
	export default {
		name: 'updatetwo',
		data() {
			return {
				book: {}
			}
		},
		methods: {
			dd() {
				this.$postkv('/api/adm/type/add', this.book).then((resp) => {
					console.log(resp.data.msg);
				})
			}
		},
		mounted() {
			console.log(this.$route.query.dx);
			console.log(this.$route.query.dx.pid);
			console.log(this.$route.query.dx.name);
			this.book = this.$route.query.dx;
		}
	}
</script>

<style>
</style>